#ifndef CVALGORITHM_H
#define CVALGORITHM_H

#include "imagerecord.h"

#include <opencv2/imgproc.hpp>
#include <QObject>
#include <opencv2/core.hpp>
#include <QRect>

class CVAlgorithm :public QObject{
    Q_OBJECT
public:
    CVAlgorithm(QObject *parent = nullptr):QObject(parent),isinit(false){}
    ~CVAlgorithm() = default;
    virtual void initialize() = 0;
    virtual bool process(ImageRecord &imgcard) = 0;
    virtual QString getName() const = 0;
    bool getIsInit() const {return isinit;} ;
    void setIsInit(const bool isInit_){isinit = isInit_;};

public slots:
    virtual void configDataChanged(const QString& category, const QString& key);
    virtual void monitorImgChangeSlots(cv::Mat& img);
private:
    bool isinit;

protected:

};

#endif // CVALGORITHM_H
